<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }

        html{
            font-size: 1rem;
            /* 设置中可更改转换基准 */
            /* 按F1搜索cssrem可快捷全部转换 */
        }  
        .box{
            width: 46.875rem;
            height: 100px;
            background-color: yellow;
        }
    </style>

    <script>
        //fontsize计算
        document.documentElement.style.fontSize=document.documentElement.
        clientWidth/750 * 16 +'px'
                        
        // fontsize =当前设备的css布局宽度/物理分辨率*基准font-size
    </script>
</head>
<body>
    <div class="box">

    </div>
</body>
</html>